
import javax.swing.*;
import java.util.*;

public class ComboTest2 {

   public static void main(String[] args) {
       int numItems = Integer.parseInt(args[0]);
      new JComboBox();  // screen out one-time init cost

      Stopwatch timer = new Stopwatch();
      timer.start();
      Vector v = new Vector(numItems);
      for (int i = 0; i < numItems; i++) {
         v.add(new Integer(i));
      }
      ComboBoxModel model = new DefaultComboBoxModel(v);
      JComboBox box = new JComboBox(model);
      timer.stop();
      System.out.println(numItems + " items: "+timer.getElapsedTime());
      System.exit(0);

   }
}
